-
Notifications
You must be signed in to change notification settings - Fork 65
Added option not to compile python files #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
askvortsov1
wants to merge
6
commits into
jrief:master
Choose a base branch
from
askvortsov1:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d240301
Added option to not scan .py files
askvortsov1 b502fce
Added option to not scan .py files
askvortsov1 50cd899
Merge branch 'master' of https://github.com/askvortsov1/django-sass-p…
askvortsov1 6493b4c
Fixed indentation
askvortsov1 bb18c22
Removed unnecssary argument from sass-precision definition
askvortsov1 67e1c01
Merge branch 'master' into master
askvortsov1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,13 @@ def add_arguments(self, parser): | |
help=_( | ||
"Set the precision for numeric computations in the SASS processor. Default: settings.SASS_PRECISION.") | ||
) | ||
parser.add_argument( | ||
'--exclude-py', | ||
action='store_true', | ||
dest='exclude_py', | ||
default=False, | ||
help=_("Exclude python files from scan?") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nitpick: perhaps change question mark to dot. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather, no punctuation mark at all. |
||
) | ||
|
||
def get_loaders(self): | ||
template_source_loaders = [] | ||
|
@@ -146,18 +153,19 @@ def handle(self, *args, **options): | |
|
||
self.processed_files = [] | ||
|
||
# find all Python files making up this project; They might invoke `sass_processor` | ||
for py_source in self.find_sources(): | ||
if self.verbosity > 1: | ||
self.stdout.write("Parsing file: %s" % py_source) | ||
elif self.verbosity == 1: | ||
self.stdout.write(".", ending="") | ||
try: | ||
self.parse_source(py_source) | ||
except (SyntaxError, IndentationError) as e: | ||
self.stderr.write("Syntax error encountered processing %s" % py_source) | ||
self.stderr.write("Aborting compilation") | ||
raise | ||
if not options['exclude_py']: | ||
# find all Python files making up this project; They might invoke `sass_processor` | ||
for py_source in self.find_sources(): | ||
if self.verbosity > 1: | ||
self.stdout.write("Parsing file: %s" % py_source) | ||
elif self.verbosity == 1: | ||
self.stdout.write(".", ending="") | ||
try: | ||
self.parse_source(py_source) | ||
except SyntaxError as e: | ||
self.stderr.write("Syntax error encountered processing %s" % py_source) | ||
self.stderr.write("Aborting compilation") | ||
raise | ||
|
||
# find all Django/Jinja2 templates making up this project; They might invoke `sass_src` | ||
templates = self.find_templates() | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.