Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ruff for linting #49

Closed
ColeDCrawford opened this issue May 13, 2024 · 3 comments
Closed

Use ruff for linting #49

ColeDCrawford opened this issue May 13, 2024 · 3 comments
Assignees

Comments

@ColeDCrawford
Copy link
Contributor

No description provided.

@aweakley aweakley self-assigned this May 14, 2024
aweakley added a commit that referenced this issue May 14, 2024
@aweakley
Copy link
Member

I've had a crack at this. @ColeDCrawford please could you have a look at 17f7960 in particular? I think it's ok, but I might have missed something.

I'm left with these ruff errors, and to fix them I think we need to decide what should be included in __all__

edtf/__init__.py:2:5: F401 `edtf.convert.dt_to_struct_time` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
edtf/__init__.py:3:5: F401 `edtf.convert.jd_to_struct_time` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
edtf/__init__.py:4:5: F401 `edtf.convert.old_specs_to_new_specs_expression` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
edtf/__init__.py:5:5: F401 `edtf.convert.struct_time_to_date` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
edtf/__init__.py:6:5: F401 `edtf.convert.struct_time_to_datetime` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
edtf/__init__.py:7:5: F401 `edtf.convert.struct_time_to_jd` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
edtf/__init__.py:8:5: F401 `edtf.convert.trim_struct_time` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
edtf/__init__.py:10:26: F401 `edtf.natlang.text_to_edtf` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
edtf/__init__.py:11:33: F401 `edtf.parser.grammar.parse_edtf` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
edtf/__init__.py:12:1: F403 `from edtf.parser.parser_classes import *` used; unable to detect undefined names
edtf/fields.py:92:20: S301 `pickle` and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue
edtf/natlang/__init__.py:1:17: F401 `.en.text_to_edtf` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
edtf/parser/__init__.py:1:33: F401 `edtf.parser.grammar.parse_edtf` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
edtf/parser/__init__.py:2:1: F403 `from edtf.parser.parser_classes import *` used; unable to detect undefined names
Found 14 errors.

@ColeDCrawford
Copy link
Contributor Author

Have a PR to that branch for review: #51

@aweakley
Copy link
Member

Thank you, I've merged it now.

@aweakley aweakley mentioned this issue May 27, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants