Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
diffoscope
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Reproducible Builds
diffoscope
Commits
b628a174
Commit
b628a174
authored
4 years ago
by
Chris Lamb
Browse files
Options
Downloads
Patches
Plain Diff
Don't alias "filter" builtin.
parent
8329774c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#145269
failed
4 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
diffoscope/diff.py
+4
-4
4 additions, 4 deletions
diffoscope/diff.py
with
4 additions
and
4 deletions
diffoscope/diff.py
+
4
−
4
View file @
b628a174
...
...
@@ -278,12 +278,12 @@ def empty_file_feeder():
return
feeder
def
make_feeder_from_raw_reader
(
in_file
,
filter
=
None
):
def
make_feeder_from_raw_reader
(
in_file
,
filter
fn
=
None
):
"""
Create a feeder that checksums, truncates, and transcodes the data. The
optional argument
FILTER
is a callable that gets passed each line, and
optional argument
filterfn
is a callable that gets passed each line, and
returns the line that should be used in its stead. (There is no facility
for
FILTER
to discard a line entirely.)
for
filterfn
to discard a line entirely.)
See _Feeder for feeders.
"""
...
...
@@ -299,7 +299,7 @@ def make_feeder_from_raw_reader(in_file, filter=None):
for
buf
in
in_file
:
line_count
+=
1
out
=
filter
(
buf
)
if
filter
else
buf
out
=
filter
fn
(
buf
)
if
filter
fn
else
buf
if
h
:
h
.
update
(
out
)
if
line_count
<
max_lines
:
...
...
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