We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b2d9165 + 4d8c5e0 commit 595cd30Copy full SHA for 595cd30
tools/linter.py
@@ -4,10 +4,8 @@
4
from argparse import ArgumentParser
5
from git import Repo, exc
6
7
-CONFIG = os.path.join(
8
- os.path.abspath(os.path.dirname(__file__)),
9
- 'lint_diff.ini',
10
-)
+CWD = os.path.abspath(os.path.dirname(__file__))
+CONFIG = os.path.join(CWD, 'lint_diff.ini')
11
12
# NOTE: The `diff` and `exclude` options of pycodestyle seem to be
13
# incompatible, so instead just exclude the necessary files when
@@ -23,7 +21,7 @@
23
21
class DiffLinter:
24
22
def __init__(self, branch):
25
self.branch = branch
26
- self.repo = Repo('.')
+ self.repo = Repo(os.path.join(CWD, '..'))
27
self.head = self.repo.head.commit
28
29
def get_branch_diff(self, uncommitted = False):
0 commit comments