Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
plotID_python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
plotID
plotID_python
Commits
f89aeb38
Commit
f89aeb38
authored
2 years ago
by
Hock, Martin
Browse files
Options
Downloads
Patches
Plain Diff
Adjust class function upper/lower case for ast.
parent
f9f0c9ce
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!65
Release v0.3.0
,
!64
New year developments
Pipeline
#888965
failed
2 years ago
Stage: linting
Stage: testing
Stage: security
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plotid/publish.py
+2
-2
2 additions, 2 deletions
plotid/publish.py
with
2 additions
and
2 deletions
plotid/publish.py
+
2
−
2
View file @
f89aeb38
...
...
@@ -259,13 +259,13 @@ class Analyzer(ast.NodeVisitor):
"
from
"
:
[],
}
def
visit_
I
mport
(
self
,
node
:
ast
.
Import
)
->
None
:
def
visit_
i
mport
(
self
,
node
:
ast
.
Import
)
->
None
:
"""
Get modules that are imported with the
'
import
'
statement.
"""
for
alias
in
node
.
names
:
self
.
stats
[
"
import
"
].
append
(
alias
.
name
)
self
.
generic_visit
(
node
)
def
visit_
I
mport
F
rom
(
self
,
node
:
ast
.
ImportFrom
)
->
None
:
def
visit_
i
mport
_f
rom
(
self
,
node
:
ast
.
ImportFrom
)
->
None
:
"""
Get modules that are imported with the
'
from X import Y
'
statement.
"""
self
.
stats
[
"
from
"
].
append
(
str
(
node
.
module
))
self
.
generic_visit
(
node
)
...
...
This diff is collapsed.
Click to expand it.
Hock, Martin
@m.hock
mentioned in commit
b4dea1b8
·
2 years ago
mentioned in commit
b4dea1b8
mentioned in commit b4dea1b8d5445023689727de419493dc8b5d8418
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment