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

Set line-length to 79 characters according to PEP-8 #389

Merged
merged 9 commits into from
Sep 17, 2024
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

### Changed

* Restored default line-length of 79 characters, as recommended by [PEP-8](https://peps.python.org/pep-0008/#maximum-line-length) [#389](https://github.com/NLeSC/python-template/pull/389)
* Moved from setup.cfg/.py to pyproject.toml [#351](https://github.com/NLeSC/python-template/issues/351)
* Moved from prospector to ruff [#336](https://github.com/NLeSC/python-template/issues/336)
* Renamed `project_name` to `directory_name` in cookiecutter questionnaire
Expand Down
17 changes: 9 additions & 8 deletions {{cookiecutter.directory_name}}/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@

# -- Options for Intersphinx

intersphinx_mapping = {'python': ('https://docs.python.org/3', None),
# Commonly used libraries, uncomment when used in package
# 'numpy': ('http://docs.scipy.org/doc/numpy/', None),
# 'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None),
# 'scikit-learn': ('https://scikit-learn.org/stable/', None),
# 'matplotlib': ('https://matplotlib.org/stable/', None),
# 'pandas': ('http://pandas.pydata.org/docs/', None),
}
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
# Commonly used libraries, uncomment when used in package
# 'numpy': ('http://docs.scipy.org/doc/numpy/', None),
# 'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None),
# 'scikit-learn': ('https://scikit-learn.org/stable/', None),
# 'matplotlib': ('https://matplotlib.org/stable/', None),
# 'pandas': ('http://pandas.pydata.org/docs/', None),
}
4 changes: 2 additions & 2 deletions {{cookiecutter.directory_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ force_single_line = 1
no_lines_before = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
known_first_party = "{{ cookiecutter.package_name }}"
src_paths = ["{{ cookiecutter.package_name }}", "tests"]
line_length = 120
line_length = 79

# For completeness, until we move to an src-based layout
[tool.setuptools.packages.find]
Expand Down Expand Up @@ -166,7 +166,7 @@ per-file-ignores = {}
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

target-version = "py39"
line-length = 120
line-length = 79
bouweandela marked this conversation as resolved.
Show resolved Hide resolved

[tool.ruff.isort]
known-first-party = ["{{ cookiecutter.package_name }}"]
Expand Down
Loading