diff options
author | Nikita Serba <nikitaserba@icloud.com> | 2020-01-22 20:34:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-22 20:34:06 +0200 |
commit | 2c29cc4f4f08906b111e306e6e806b5af628fbbd (patch) | |
tree | 5d2d5d421edd7872f5d8f4d4b63542e8cce9186f /testsuite | |
parent | 2f0ca0b42660d7a6ee239f3a372a8783ad20c37a (diff) | |
parent | d219c684f117be77927d33146e76a5364161e518 (diff) | |
download | pep8-2c29cc4f4f08906b111e306e6e806b5af628fbbd.tar.gz |
Merge branch 'master' into master
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/E40.py | 15 | ||||
-rw-r--r-- | testsuite/python3.py | 7 | ||||
-rw-r--r-- | testsuite/python38.py | 12 |
3 files changed, 34 insertions, 0 deletions
diff --git a/testsuite/E40.py b/testsuite/E40.py index f9a18fc..6c71fa2 100644 --- a/testsuite/E40.py +++ b/testsuite/E40.py @@ -34,6 +34,21 @@ finally: print('made attempt to import foo') import bar +#: Okay +with warnings.catch_warnings(): + warnings.filterwarnings("ignore", DeprecationWarning) + import foo + +import bar +#: Okay +if False: + import foo +elif not True: + import bar +else: + import mwahaha + +import bar #: E402 VERSION = '1.2.3' diff --git a/testsuite/python3.py b/testsuite/python3.py index be7c58f..709695a 100644 --- a/testsuite/python3.py +++ b/testsuite/python3.py @@ -37,3 +37,10 @@ class Class: def m(self): xs: List[int] = [] + + +# Used to trigger W504 +def f( + x: str = ... +): + ... diff --git a/testsuite/python38.py b/testsuite/python38.py index adf217d..5f62a3f 100644 --- a/testsuite/python38.py +++ b/testsuite/python38.py @@ -1,3 +1,15 @@ #: Okay def f(a, /, b): pass +#: Okay +if x := 1: + print(x) +if m and (token := m.group(1)): + pass +stuff = [[y := f(x), x / y] for x in range(5)] +#: E225:1:5 +if x:= 1: + pass +#: E225:1:18 +if False or (x :=1): + pass |