Skip to content

Commit

Permalink
Update pylint config to ignore specific directories
Browse files Browse the repository at this point in the history
- Removed git ls-files
- Added tests, ro-crate-metadata, create_ro_crate.py, upload_crate.py to be ignored by pylint. Moved these to pylintrc
- create_ro_crate.py, upload_crate.py  are ignored due to rocrate package depending on older version of urllib3, and knowledge graph project depends on newer version.
  • Loading branch information
alexhambley committed Sep 11, 2024
1 parent f6c70e6 commit 7bc6e99
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
poetry install --all-extras -vv
- name: Analysing the code with pylint
run: |
poetry run pylint --errors-only $(git ls-files '*.py') --ignore=tests/SPARQL,ro-crate-metadata --ignore-patterns=workflowhub_graph/create_ro_crate.py
poetry run pylint -v --errors-only .
- name: Testing the code with pytest
run: |
poetry run py.test tests --ignore=tests/SPARQL --ignore=ro-crate-metadata --ignore=workflowhub_graph/create_ro_crate.py
Expand Down
7 changes: 4 additions & 3 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ fail-under = 10
# from-stdin =

# Files or directories to be skipped. They should be base names, not paths.
ignore = ["CVS"]
ignore = CVS, tests, ro-crate-metadata, create_ro_crate.py, upload_crate.py


# Add files or directories matching the regular expressions patterns to the
# ignore-list. The regex matches against paths and can be in Posix or Windows
Expand All @@ -47,7 +48,7 @@ ignore = ["CVS"]
# Files or directories matching the regular expression patterns are skipped. The
# regex matches against base names, not paths. The default value ignores Emacs
# file locks
ignore-patterns = ["^\\.#"]
ignore-patterns = ^\\.#,

# List of module names for which member attributes should not be checked and will
# not be imported (useful for modules/projects where namespaces are manipulated
Expand Down Expand Up @@ -83,7 +84,7 @@ persistent = true

# Minimum Python version to use for version dependent checks. Will default to the
# version used to run pylint.
py-version = 3.10
py-version = 3.11

# Discover python modules and packages in the file system subtree.
# recursive =
Expand Down
Empty file added __init__.py
Empty file.

0 comments on commit 7bc6e99

Please sign in to comment.