Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
c88b58ee
Commit
c88b58ee
authored
Mar 28, 2016
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some pylint findings
parent
3d47a980
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
21 deletions
+18
-21
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+18
-21
No files found.
Cython/Compiler/Code.py
View file @
c88b58ee
...
...
@@ -40,7 +40,7 @@ try:
except
ImportError
:
from
builtins
import
str
as
basestring
KEYWORDS_MUST_BE_BYTES
=
sys
.
version_info
<
(
2
,
7
)
KEYWORDS_MUST_BE_BYTES
=
sys
.
version_info
<
(
2
,
7
)
non_portable_builtins_map
=
{
...
...
@@ -481,7 +481,7 @@ class UtilityCode(UtilityCodeBase):
is_specialised1, impl = self.inject_string_constants(impl, output)
is_specialised2, impl = self.inject_unbound_methods(impl, output)
writer = output['
utility_code_def
']
writer.putln("/* %s */" % self.name)
;
writer.putln("/* %s */" % self.name)
if not (is_specialised1 or is_specialised2):
# no module specific adaptations => can be reused
writer.put_or_include(impl, '
%
s_impl
' % self.name)
...
...
@@ -849,7 +849,7 @@ class StringConst(object):
def add_py_version(self, version):
if not version:
self.py_versions = [2,3]
self.py_versions = [2,
3]
elif version not in self.py_versions:
self.py_versions.append(version)
...
...
@@ -1280,8 +1280,8 @@ class GlobalState(object):
self
.
generate_object_constant_decls
()
def
generate_object_constant_decls
(
self
):
consts
=
[
(
len
(
c
.
cname
),
c
.
cname
,
c
)
for
c
in
self
.
py_constants
]
consts
=
[(
len
(
c
.
cname
),
c
.
cname
,
c
)
for
c
in
self
.
py_constants
]
consts
.
sort
()
decls_writer
=
self
.
parts
[
'decls'
]
for
_
,
cname
,
c
in
consts
:
...
...
@@ -1345,8 +1345,7 @@ class GlobalState(object):
py_strings
.
sort
()
w
=
self
.
parts
[
'pystring_table'
]
w
.
putln
(
""
)
w
.
putln
(
"static __Pyx_StringTabEntry %s[] = {"
%
Naming
.
stringtab_cname
)
w
.
putln
(
"static __Pyx_StringTabEntry %s[] = {"
%
Naming
.
stringtab_cname
)
for
c_cname
,
_
,
py_string
in
py_strings
:
if
not
py_string
.
is_str
or
not
py_string
.
encoding
or
\
py_string
.
encoding
in
(
'ASCII'
,
'USASCII'
,
'US-ASCII'
,
...
...
@@ -1359,8 +1358,7 @@ class GlobalState(object):
"static PyObject *%s;"
%
py_string
.
cname
)
if
py_string
.
py3str_cstring
:
w
.
putln
(
"#if PY_MAJOR_VERSION >= 3"
)
w
.
putln
(
"{&%s, %s, sizeof(%s), %s, %d, %d, %d},"
%
(
w
.
putln
(
"{&%s, %s, sizeof(%s), %s, %d, %d, %d},"
%
(
py_string
.
cname
,
py_string
.
py3str_cstring
.
cname
,
py_string
.
py3str_cstring
.
cname
,
...
...
@@ -1368,8 +1366,7 @@ class GlobalState(object):
py_string
.
intern
))
w
.
putln
(
"#else"
)
w
.
putln
(
"{&%s, %s, sizeof(%s), %s, %d, %d, %d},"
%
(
w
.
putln
(
"{&%s, %s, sizeof(%s), %s, %d, %d, %d},"
%
(
py_string
.
cname
,
c_cname
,
c_cname
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment