Skip to content

Commit

Permalink
Added import-outside-toplevel message example (#6237)
Browse files Browse the repository at this point in the history
  • Loading branch information
matusvalo authored Apr 9, 2022
1 parent 0afa5bc commit 52daa83
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/data/messages/i/import-outside-toplevel/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
def print_python_version():
import sys # [import-outside-toplevel]
print(sys.version_info)
5 changes: 5 additions & 0 deletions doc/data/messages/i/import-outside-toplevel/good.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import sys


def print_python_version():
print(sys.version_info)

0 comments on commit 52daa83

Please sign in to comment.