Skip to content

Commit

Permalink
Move all __future__ statements below docstrings.
Browse files Browse the repository at this point in the history
Otherwise the docstrings are not actually assigned to __doc__!  And
-emit-docstring=0 does not work!  They become unused constants that only
take up space.
  • Loading branch information
Andy Chu committed Oct 6, 2018
1 parent 4884bac commit 718baec
Show file tree
Hide file tree
Showing 33 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion asdl/arith_ast_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python
from __future__ import print_function
"""
arith_ast_test.py: Tests for arith_ast.py
"""
from __future__ import print_function

import cStringIO
import unittest
Expand Down
2 changes: 1 addition & 1 deletion asdl/arith_parse.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python
from __future__ import print_function
"""
arith_parse.py: Parse shell-like and C-like arithmetic.
"""
from __future__ import print_function

import sys

Expand Down
2 changes: 1 addition & 1 deletion asdl/asdl_demo.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python
from __future__ import print_function
"""
asdl_demo.py
"""
from __future__ import print_function

import sys
from asdl import asdl_ as asdl
Expand Down
2 changes: 1 addition & 1 deletion asdl/front_end.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/python
from __future__ import print_function
"""
front_end.py: Lexer and parser for the ASDL schema language.
"""
from __future__ import print_function

import re

Expand Down
2 changes: 1 addition & 1 deletion asdl/gen_cpp.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
from __future__ import print_function
"""
asdl_cpp.py
Expand All @@ -24,6 +23,7 @@
Everything is decoded on the fly, or is a char*, which I don't think has to be
aligned (because the natural alignment woudl be 1 byte anyway.)
"""
from __future__ import print_function

import sys

Expand Down
2 changes: 1 addition & 1 deletion asdl/gen_python.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
from __future__ import print_function
"""
gen_python.py
Expand All @@ -8,6 +7,7 @@
TODO:
- What about Id? app_types?
"""
from __future__ import print_function

from asdl import visitor

Expand Down
2 changes: 1 addition & 1 deletion asdl/py_meta_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python
from __future__ import print_function
"""
py_meta_test.py: Tests for py_meta.py
"""
from __future__ import print_function

import unittest

Expand Down
2 changes: 1 addition & 1 deletion asdl/unpickle_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/python -S
from __future__ import print_function
"""
unpickle_test.py: Tests for unpickle.py
"""
from __future__ import print_function

import unittest

Expand Down
2 changes: 1 addition & 1 deletion core/args.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
from __future__ import print_function
"""
args.py - Flag, option, and arg parsing for the shell.
Expand Down Expand Up @@ -56,6 +55,7 @@
However I don't see these used anywhere! I only see ':' used.
"""
from __future__ import print_function

import libc
from core import util
Expand Down
2 changes: 1 addition & 1 deletion core/braces.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
from __future__ import print_function
"""
braces.py - Implementation of {andy,bob}@example.com
Expand All @@ -14,6 +13,7 @@
- has Lit_Star, ?, [ ] -- globbing?
- but after expansion do you still have those flags?
"""
from __future__ import print_function

import sys

Expand Down
2 changes: 1 addition & 1 deletion core/builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
from __future__ import print_function
"""
builtins.py - Implementation of builtins, along with their metadata.
Expand All @@ -25,6 +24,7 @@
- syntax errors in special builtins may cause the shell to abort, but NOT for
regular builtins?
"""
from __future__ import print_function

import os
import signal
Expand Down
2 changes: 1 addition & 1 deletion core/builtin_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/python -S
from __future__ import print_function
"""
builtin_test.py: Tests for builtin.py
"""
from __future__ import print_function

import unittest

Expand Down
2 changes: 1 addition & 1 deletion core/cmd_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
from __future__ import print_function
"""
cmd_exec.py -- Interpreter for the command language.
Expand All @@ -14,6 +13,7 @@
This just does head? Last one wins.
"""
from __future__ import print_function

import os
import resource
Expand Down
2 changes: 1 addition & 1 deletion core/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
from __future__ import print_function
"""
completion.py - Tab completion.
Expand All @@ -28,6 +27,7 @@
bash note: most of this stuff is in pcomplete.c and bashline.c (4K lines!).
Uses ITEMLIST with a bunch of flags.
"""
from __future__ import print_function

import atexit
import os
Expand Down
2 changes: 1 addition & 1 deletion core/completion_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
from __future__ import print_function
"""
completion_test.py: Tests for completion.py
"""
from __future__ import print_function

import os
import unittest
Expand Down
2 changes: 1 addition & 1 deletion core/dev.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/python
from __future__ import print_function
"""
dev.py - Devtools / introspection.
"""
from __future__ import print_function

import os

Expand Down
2 changes: 1 addition & 1 deletion core/glob_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python
from __future__ import print_function
"""
glob_test.py: Tests for glob.py
"""
from __future__ import print_function

import re
import unittest
Expand Down
2 changes: 1 addition & 1 deletion core/id_kind_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
from __future__ import print_function
"""
id_kind_gen.py - Code generation for id_kind.py.
"""
from __future__ import print_function

import sys

Expand Down
2 changes: 1 addition & 1 deletion core/id_kind_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
from __future__ import print_function
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -9,6 +8,7 @@
"""
id_kind_test.py: Tests for id_kind.py
"""
from __future__ import print_function

import unittest

Expand Down
2 changes: 1 addition & 1 deletion core/lexer_gen.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python
from __future__ import print_function
"""
lex_gen.py
"""
from __future__ import print_function

import cStringIO
import sys
Expand Down
2 changes: 1 addition & 1 deletion core/lexer_gen_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/python -S
from __future__ import print_function
"""
lexer_gen_test.py: Tests for lexer_gen.py
"""
from __future__ import print_function

import unittest

Expand Down
2 changes: 1 addition & 1 deletion core/libstr_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/python -S
from __future__ import print_function
"""
libstr_test.py: Tests for libstr.py
"""
from __future__ import print_function

import unittest

Expand Down
2 changes: 1 addition & 1 deletion core/main_loop.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/python
from __future__ import print_function
"""
main_loop.py
Expand All @@ -15,6 +14,7 @@
ex.Execute() -- only used for tests
ParseWholeFile() -- needs to check the here doc.
"""
from __future__ import print_function

from core import ui
from core import util
Expand Down
2 changes: 1 addition & 1 deletion core/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
from __future__ import print_function
"""
process.py - Launch processes and manipulate file descriptors.
"""
from __future__ import print_function

import errno
import fcntl
Expand Down
2 changes: 1 addition & 1 deletion core/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
from __future__ import print_function
"""
state.py - Interpreter state
"""
from __future__ import print_function

import cStringIO
import os
Expand Down
2 changes: 1 addition & 1 deletion core/test_builtin.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python
from __future__ import print_function
"""
test_builtin.py
"""
from __future__ import print_function

from core import expr_eval
from core import util
Expand Down
2 changes: 1 addition & 1 deletion core/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
from __future__ import print_function
"""
ui.py - User interface constructs.
"""
from __future__ import print_function

import sys

Expand Down
2 changes: 1 addition & 1 deletion core/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
from __future__ import print_function
"""
util.py - Common infrastructure.
"""
from __future__ import print_function

import cStringIO
import os
Expand Down
2 changes: 1 addition & 1 deletion core/word_eval_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
from __future__ import print_function
"""
word_eval_test.py: Tests for word_eval.py
"""
from __future__ import print_function

import unittest

Expand Down
2 changes: 1 addition & 1 deletion core/word_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python
from __future__ import print_function
"""
word_test.py: Tests for word.py
"""
from __future__ import print_function

import unittest

Expand Down
2 changes: 1 addition & 1 deletion osh/asdl_gen.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python
from __future__ import print_function
"""
asdl_gen.py - Generate Python and C from OSH ASDL schemas.
"""
from __future__ import print_function

import os
import pickle
Expand Down
2 changes: 1 addition & 1 deletion osh/cmd_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
from __future__ import print_function
"""
cmd_parse.py - Parse high level shell commands.
"""
from __future__ import print_function

from asdl import const

Expand Down
2 changes: 1 addition & 1 deletion osh/lex_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python
from __future__ import print_function
"""
lex_test.py: Tests for lex.py
"""
from __future__ import print_function

import re
import unittest
Expand Down

0 comments on commit 718baec

Please sign in to comment.