summaryrefslogtreecommitdiff
path: root/src/flake8/main/cli.py
diff options
context:
space:
mode:
authorIan Cordasco <graffatcolmingov@gmail.com>2016-06-25 10:12:13 -0500
committerIan Cordasco <graffatcolmingov@gmail.com>2016-06-25 10:12:13 -0500
commit1a2c68f5da8ae95b8a156ef6f6a772bf82cf0f88 (patch)
treee125328f45274330a116d0ae659e20ad4c8367cf /src/flake8/main/cli.py
parent5c8d767626a31560494996cd02ec5d654734aab2 (diff)
downloadflake8-1a2c68f5da8ae95b8a156ef6f6a772bf82cf0f88.tar.gz
Move flake8 into src
This is an emerging best practice and there is little reason to not follow it
Diffstat (limited to 'src/flake8/main/cli.py')
-rw-r--r--src/flake8/main/cli.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/flake8/main/cli.py b/src/flake8/main/cli.py
new file mode 100644
index 0000000..29bd159
--- /dev/null
+++ b/src/flake8/main/cli.py
@@ -0,0 +1,17 @@
+"""Command-line implementation of flake8."""
+from flake8.main import application
+
+
+def main(argv=None):
+ # type: (Union[NoneType, List[str]]) -> NoneType
+ """Main entry-point for the flake8 command-line tool.
+
+ This handles the creation of an instance of :class:`Application`, runs it,
+ and then exits the application.
+
+ :param list argv:
+ The arguments to be passed to the application for parsing.
+ """
+ app = application.Application()
+ app.run(argv)
+ app.exit()