Skip to content

Commit 9f93944

Browse files
authored
add autopep8 to Contributions guide (#852)
* add autopep8 to Contrib. * simplify cmd * update GH templates * add pytest-flake8 * update GH template
1 parent 539d129 commit 9f93944

File tree

7 files changed

+12
-3
lines changed

7 files changed

+12
-3
lines changed

.github/CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,7 @@ A lot of good work has already been done in project mechanics (requirements.txt,
5151
## Coding Styleguide
5252
1. Test the code with flake8.
5353
2. Use f-strings.
54+
3. run locally PEP8 fixes:
55+
```
56+
autopep8 -v -r --max-line-length 120 --in-place .
57+
```

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
name: Bug report
33
about: Create a report to help us improve
44
title: ''
5-
labels: bug
5+
labels: bug, help wanted
66
assignees: ''
77

88
---
99

10+
<!--
1011
### Common bugs:
1112
1. Tensorboard not showing in Jupyter-notebook see [issue 79](https://github.com/PyTorchLightning/pytorch-lightning/issues/79).
1213
2. PyTorch 1.1.0 vs 1.2.0 support [see FAQ](https://github.com/PyTorchLightning/pytorch-lightning#faq)
14+
-->
1315

1416
## 🐛 Bug
1517

.github/ISSUE_TEMPLATE/documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Typos and doc fixes
33
about: Typos and doc fixes
44
title: ''
5-
labels: typo
5+
labels: typo, documentation
66
assignees: ''
77

88
---

pytorch_lightning/loggers/comet.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class CometLogger(LightningLoggerBase):
3131
r"""
3232
Log using `comet.ml <https://www.comet.ml>`_.
3333
"""
34+
3435
def __init__(self, api_key=None, save_dir=None, workspace=None,
3536
rest_api_key=None, project_name=None, experiment_name=None, **kwargs):
3637
r"""

pytorch_lightning/loggers/neptune.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class NeptuneLogger(LightningLoggerBase):
2727
Neptune logger can be used in the online mode or offline (silent) mode.
2828
To log experiment data in online mode, NeptuneLogger requries an API key:
2929
"""
30+
3031
def __init__(self, api_key=None, project_name=None, offline_mode=False,
3132
experiment_name=None, upload_source_files=None,
3233
params=None, properties=None, tags=None, **kwargs):

pytorch_lightning/trainer/trainer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ def run_pretrain_routine(self, model):
862862

863863
# check if we should run validation during training
864864
self.disable_validation = ((self.num_val_batches == 0 or
865-
not self.is_overriden('validation_step')) and
865+
not self.is_overriden('validation_step')) and
866866
not self.fast_dev_run)
867867

868868
# run tiny validation (if validation defined)

tests/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ coverage
44
codecov
55
pytest>=3.0.5
66
pytest-cov
7+
pytest-flake8
78
flake8
89
check-manifest
910
test-tube>=0.7.5

0 commit comments

Comments
 (0)