Skip to content

Commit

Permalink
reduce file length
Browse files Browse the repository at this point in the history
  • Loading branch information
avdata99 committed Apr 23, 2024
1 parent 7266fbc commit d721e87
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 56 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/test-ckan-2.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ jobs:
pip install flake8
flake8 . --count --statistics
- name: Black
run: |
pip install --ignore-installed black
black . --check --diff
- name: Install requirements
# Install any extra requirements your extension has here (dev requirements, other extensions etc)
run: |
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test-ckan-2.9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ jobs:
pip install flake8
flake8 . --count --statistics
- name: Black
run: |
pip install black
black . --check --diff
- name: Install requirements
# Install any extra requirements your extension has here (dev requirements, other extensions etc)
run: |
Expand Down
7 changes: 1 addition & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
repos:
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
args: [ckanext, --check, --diff]
language_version: python3.8
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
files: ckanext
args: [--max-line-length=130]
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ do:

### Activate pre-commits

There are github actions to check code with `flake8` and `black` so
it will be usefull to activate pre-commits
There are github actions to check code with `flake8` so it will be usefull to activate pre-commits

```
pip install pre-commit
Expand Down
39 changes: 4 additions & 35 deletions ckanext/announcements/blueprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,38 +113,7 @@ def delete():
return toolkit.redirect_to("announcements.index")


announcements_blueprint.add_url_rule(
rule="/",
view_func=index,
methods=[
"GET",
],
strict_slashes=False,
)

announcements_blueprint.add_url_rule(
rule="/new",
view_func=create,
methods=[
"POST",
],
strict_slashes=False,
)

announcements_blueprint.add_url_rule(
rule="/update",
view_func=update,
methods=[
"POST",
],
strict_slashes=False,
)

announcements_blueprint.add_url_rule(
rule="/delete",
view_func=delete,
methods=[
"POST",
],
strict_slashes=False,
)
announcements_blueprint.add_url_rule(rule="/", view_func=index, methods=["GET"], strict_slashes=False)
announcements_blueprint.add_url_rule(rule="/new", view_func=create, methods=["POST"], strict_slashes=False)
announcements_blueprint.add_url_rule(rule="/update", view_func=update, methods=["POST"], strict_slashes=False)
announcements_blueprint.add_url_rule(rule="/delete", view_func=delete, methods=["POST"], strict_slashes=False)
2 changes: 0 additions & 2 deletions pyproject.toml

This file was deleted.

2 changes: 1 addition & 1 deletion test.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ smtp_server = localhost
error_email_from = ckan@localhost

[app:main]
use = config:/srv/app/src/ckan/test-core.ini
use = config:../../ckan/test-core.ini

# Insert any custom config settings to be used when running your extension's
# tests here. These will override the one defined in CKAN core's test-core.ini
Expand Down

0 comments on commit d721e87

Please sign in to comment.