diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aa773af..142b9e1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ Users are encouraged to use GitHub Discussions for engaging with researchers, de ### Project Code Style -Code in this repository should conform to PEP8 standards. Style/lint checks are run to validate this. Line length must be limited to no more than 88 characters. +Code in this repository should conform to PEP8 standards. Style/lint checks are run to validate this. Line length must be limited to no more than 100 characters. ### Pull Request Checklist diff --git a/prototype_template/template_module/template_class.py b/prototype_template/template_module/template_class.py index 1cc3132..e047010 100644 --- a/prototype_template/template_module/template_class.py +++ b/prototype_template/template_module/template_class.py @@ -8,9 +8,7 @@ class TemplateClass: def __init__( self, - some_parameter: Union[ - int, float, str, bool, List[Union[int, float, str, bool]] - ], + some_parameter: Union[int, float, str, bool, List[Union[int, float, str, bool]]], optional_parameter: Optional[ Union[int, float, str, bool, List[Union[int, float, str, bool]]] ] = None, diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..468dbfa --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[tool.black] +line-length = 100 +target-version = ['py37', 'py38', 'py39', 'py310'] diff --git a/tests/README.md b/tests/README.md index 53bb4a9..ff22713 100644 --- a/tests/README.md +++ b/tests/README.md @@ -16,7 +16,7 @@ Environments for this repository are configured in [`tox.ini`] as described belo The `lint` environment ensures that the code meets basic coding standards, including -- [_Black_] formatting style +- [_Black_] formatting style, as configured by [`pyproject.toml`] - [mypy] type annotation checker, as configured by [`mypy.ini`] - [pylint], as configured by [`.pylintrc`] @@ -63,6 +63,7 @@ $ tox -ecoverage [`mypy.ini`]: /mypy.ini [treon]: https://github.com/ReviewNB/treon [_Black_]: https://github.com/psf/black +[`pyproject.toml`]: /pyproject.toml [pylint]: https://github.com/PyCQA/pylint [`.pylintrc`]: /.pylintrc [nbqa]: https://github.com/nbQA-dev/nbQA