Skip to content

Commit bc40f36

Browse files
Apply ruff/flake8-implicit-str-concat rule ISC001 (#1598)
1 parent ecf7f86 commit bc40f36

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

fsspec/gui.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def _repr_mimebundle_(self, *args, **kwargs):
9494
try:
9595
return self.panel._repr_mimebundle_(*args, **kwargs)
9696
except (ValueError, AttributeError):
97-
raise NotImplementedError("Panel does not seem to be set " "up properly")
97+
raise NotImplementedError("Panel does not seem to be set up properly")
9898

9999
def connect(self, signal, slot):
100100
"""Associate call back with given event

fsspec/implementations/tests/test_local.py

+9-11
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
}
3535

3636
csv_files = {
37-
".test.fakedata.1.csv": (b"a,b\n" b"1,2\n"),
38-
".test.fakedata.2.csv": (b"a,b\n" b"3,4\n"),
37+
".test.fakedata.1.csv": (b"a,b\n1,2\n"),
38+
".test.fakedata.2.csv": (b"a,b\n3,4\n"),
3939
}
4040
odir = os.getcwd()
4141

@@ -123,21 +123,19 @@ def test_urlpath_expand_read():
123123
def test_cats():
124124
with filetexts(csv_files, mode="b"):
125125
fs = fsspec.filesystem("file")
126-
assert fs.cat(".test.fakedata.1.csv") == b"a,b\n" b"1,2\n"
126+
assert fs.cat(".test.fakedata.1.csv") == b"a,b\n1,2\n"
127127
out = set(fs.cat([".test.fakedata.1.csv", ".test.fakedata.2.csv"]).values())
128-
assert out == {b"a,b\n" b"1,2\n", b"a,b\n" b"3,4\n"}
129-
assert fs.cat(".test.fakedata.1.csv", None, None) == b"a,b\n" b"1,2\n"
130-
assert fs.cat(".test.fakedata.1.csv", start=1, end=6) == b"a,b\n" b"1,2\n"[1:6]
131-
assert fs.cat(".test.fakedata.1.csv", start=-1) == b"a,b\n" b"1,2\n"[-1:]
132-
assert (
133-
fs.cat(".test.fakedata.1.csv", start=1, end=-2) == b"a,b\n" b"1,2\n"[1:-2]
134-
)
128+
assert out == {b"a,b\n1,2\n", b"a,b\n3,4\n"}
129+
assert fs.cat(".test.fakedata.1.csv", None, None) == b"a,b\n1,2\n"
130+
assert fs.cat(".test.fakedata.1.csv", start=1, end=6) == b"a,b\n1,2\n"[1:6]
131+
assert fs.cat(".test.fakedata.1.csv", start=-1) == b"a,b\n1,2\n"[-1:]
132+
assert fs.cat(".test.fakedata.1.csv", start=1, end=-2) == b"a,b\n1,2\n"[1:-2]
135133
out = set(
136134
fs.cat(
137135
[".test.fakedata.1.csv", ".test.fakedata.2.csv"], start=1, end=-1
138136
).values()
139137
)
140-
assert out == {b"a,b\n" b"1,2\n"[1:-1], b"a,b\n" b"3,4\n"[1:-1]}
138+
assert out == {b"a,b\n1,2\n"[1:-1], b"a,b\n3,4\n"[1:-1]}
141139

142140

143141
def test_urlpath_expand_write():

fsspec/implementations/tests/test_sftp.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def test_get_dir(protocol, ssh, root_path, tmpdir):
114114

115115
f.get(
116116
protocol
117-
+ "://{username}:{password}@{host}:{port}" "{root_path}".format(
117+
+ "://{username}:{password}@{host}:{port}{root_path}".format(
118118
root_path=root_path, **ssh
119119
),
120120
f"{path}/test2",

fsspec/tests/test_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def test_pipe_cat(m):
191191
def test_read_block_delimiter(m):
192192
fs = MemoryFileSystem()
193193
with fs.open("/myfile", "wb") as f:
194-
f.write(b"some\n" b"lines\n" b"of\n" b"text")
194+
f.write(b"some\nlines\nof\ntext")
195195
assert fs.read_block("/myfile", 0, 2, b"\n") == b"some\n"
196196
assert fs.read_block("/myfile", 2, 6, b"\n") == b"lines\n"
197197
assert fs.read_block("/myfile", 6, 2, b"\n") == b""
@@ -203,7 +203,7 @@ def test_read_block_delimiter(m):
203203
def test_open_text(m):
204204
fs = MemoryFileSystem()
205205
with fs.open("/myfile", "wb") as f:
206-
f.write(b"some\n" b"lines\n" b"of\n" b"text")
206+
f.write(b"some\nlines\nof\ntext")
207207
f = fs.open("/myfile", "r", encoding="latin1")
208208
assert f.encoding == "latin1"
209209

0 commit comments

Comments
 (0)