Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-dev-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-dev-tools
Commits
c5212eeb
Commit
c5212eeb
authored
9 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup: minor style edits
parent
086d8b18
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
check_source/check_spelling.py
+25
-10
25 additions, 10 deletions
check_source/check_spelling.py
with
25 additions
and
10 deletions
check_source/check_spelling.py
+
25
−
10
View file @
c5212eeb
...
...
@@ -47,9 +47,10 @@ else:
import
enchant
dict_spelling
=
enchant
.
Dict
(
"
en_US
"
)
from
check_spelling_c_config
import
(
dict_custom
,
dict_ignore
,
)
from
check_spelling_c_config
import
(
dict_custom
,
dict_ignore
,
)
def
words_from_text
(
text
):
...
...
@@ -118,11 +119,12 @@ def words_from_text(text):
class
Comment
:
__slots__
=
(
"
file
"
,
"
text
"
,
"
line
"
,
"
type
"
,
)
__slots__
=
(
"
file
"
,
"
text
"
,
"
line
"
,
"
type
"
,
)
def
__init__
(
self
,
file
,
text
,
line
,
type
):
self
.
file
=
file
...
...
@@ -330,7 +332,7 @@ def spell_check_comments_recursive(dirpath):
def
source_list
(
path
,
filename_check
=
None
):
for
dirpath
,
dirnames
,
filenames
in
os
.
walk
(
path
):
# skip '.
svn
'
# skip '.
git
'
if
dirpath
.
startswith
(
"
.
"
):
continue
...
...
@@ -341,7 +343,20 @@ def spell_check_comments_recursive(dirpath):
def
is_source
(
filename
):
ext
=
splitext
(
filename
)[
1
]
return
(
ext
in
{
"
.c
"
,
"
.inl
"
,
"
.cpp
"
,
"
.cxx
"
,
"
.hpp
"
,
"
.hxx
"
,
"
.h
"
,
"
.hh
"
,
"
.m
"
,
"
.mm
"
,
"
.osl
"
,
"
.py
"
})
return
(
ext
in
{
"
.c
"
,
"
.inl
"
,
"
.cpp
"
,
"
.cxx
"
,
"
.hpp
"
,
"
.hxx
"
,
"
.h
"
,
"
.hh
"
,
"
.m
"
,
"
.mm
"
,
"
.osl
"
,
"
.py
"
,
})
for
filepath
in
source_list
(
dirpath
,
is_source
):
spell_check_comments
(
filepath
)
...
...
This diff is collapsed.
Click to expand it.
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