Skip to content

Commit

Permalink
remove dangling spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
prusnak committed Oct 7, 2024
1 parent 6947166 commit 78cb4e2
Show file tree
Hide file tree
Showing 51 changed files with 749 additions and 749 deletions.
2 changes: 1 addition & 1 deletion docs/example_plugins/gpsd_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def update_telemetry(self, telemeter):
telemeter.sensors["location"].accuracy = self.accuracy
telemeter.sensors["location"].stale_time = 5
telemeter.sensors["location"].set_update_time(self.last_update)

else:
RNS.log("No location from GPSd yet", RNS.LOG_DEBUG)

Expand Down
24 changes: 12 additions & 12 deletions docs/example_plugins/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def get_image_field(self, preset="default"):
try:
if self.is_stale():
self.update()

if self.source_data != None:
max_dimension = quality_presets[preset]["max"]
quality = quality_presets[preset]["quality"]
Expand Down Expand Up @@ -121,13 +121,13 @@ def read_frames(self):
if not ret:
self.camera_ready = False
break

if not self.frame_queue.empty():
try:
self.frame_queue.get_nowait()
except queue.Empty:
pass

self.frame_queue.put(frame)

except Exception as e:
Expand All @@ -140,9 +140,9 @@ def update(self):
self.start_reading()
while not self.camera_ready:
time.sleep(0.2)

retval, frame = self.camera.read()

if not retval:
self.source_data = None
else:
Expand All @@ -154,8 +154,8 @@ def release_camera(self):
try:
self.camera.release()
except:
pass
pass

self.camera = None
self.camera_ready = False

Expand Down Expand Up @@ -185,14 +185,14 @@ def read_frames(self):
if not ret:
self.stream_ready = False
else:
self.stream_ready = True
self.stream_ready = True
if not self.frame_queue.empty():
if self.frame_queue.qsize() > 1:
try:
self.frame_queue.get_nowait()
except queue.Empty:
pass

self.frame_queue.put(frame)

RNS.log(f"{self)} idled", RNS.LOG_DEBUG)
Expand Down Expand Up @@ -220,8 +220,8 @@ def release_stream(self):
try:
self.stream.release()
except:
pass
pass

self.stream = None
self.stream_ready = False

Expand Down Expand Up @@ -306,7 +306,7 @@ def handle_command(self, arguments, lxm):

if not source in self.sources:
self.message_response("The specified view source does not exist on this system", requestor)

else:
image_field = self.sources[source].get_image_field(quality_preset)
image_timestamp = self.timestamp_str(self.sources[source].last_update)
Expand Down
2 changes: 1 addition & 1 deletion docs/utilities/rns_audio_call_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def simulate(link_speed=9600, audio_slot_ms=70, codec_rate=1200, method="msgpack
PAYLOAD_LATENCY = round(ENCRYPTED_PAYLOAD_LEN*PER_BYTE_LATENCY_MS, 1)
RAW_DATA_LATENCY = round(AUDIO_LEN*PER_BYTE_LATENCY_MS, 1)
PACKING_LATENCY = round(PACKING_OVERHEAD*PER_BYTE_LATENCY_MS, 1)

DATA_LATENCY = round(ENCRYPTED_PAYLOAD_LEN*PER_BYTE_LATENCY_MS, 1)
ENCRYPTION_LATENCY = round((ENCRYPTED_PAYLOAD_LEN-PL_LEN)*PER_BYTE_LATENCY_MS, 1)
if ENCRYPTED_PAYLOAD_LEN-PL_LEN == 1:
Expand Down
2 changes: 1 addition & 1 deletion recipes/codec2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def link_dirs_flags(self, arch):
# variable `LIBS`'''
# return ' -lcodec2{version} -lssl{version}'.format(version=self.version)

def build_arch(self, arch):
def build_arch(self, arch):
with current_directory(self.get_build_dir(arch.arch)):
env = self.get_recipe_env(arch)
flags = [
Expand Down
4 changes: 2 additions & 2 deletions recipes/ffpyplayer/setup.py.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
@@ -27,12 +27,6 @@
# This sets whether or not Cython gets added to setup_requires.
declare_cython = False

-if platform in ('ios', 'android'):
- # NEVER use or declare cython on these platforms
- print('Not using cython on %s' % platform)
- can_use_cython = False
-else:
- declare_cython = True

src_path = build_path = dirname(__file__)
print(f'Source/build path: {src_path}')
2 changes: 1 addition & 1 deletion recipes/numpy/patches/add_libm_explicitly_to_build.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ index 66c07c9..d34bd93 100644
extra_info=lapack_info,
+ libraries=['m'],
)

# umath_linalg module
@@ -54,7 +54,7 @@ def configuration(parent_package='', top_path=None):
sources=['umath_linalg.c.src', get_lapack_lite_sources],
Expand Down
8 changes: 4 additions & 4 deletions recipes/numpy/patches/remove-default-paths.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ index fc7018a..7b514bc 100644
@@ -340,10 +340,10 @@ if os.path.join(sys.prefix, 'lib') not in default_lib_dirs:
default_include_dirs.append(os.path.join(sys.prefix, 'include'))
default_src_dirs.append(os.path.join(sys.prefix, 'src'))

-default_lib_dirs = [_m for _m in default_lib_dirs if os.path.isdir(_m)]
-default_runtime_dirs = [_m for _m in default_runtime_dirs if os.path.isdir(_m)]
-default_include_dirs = [_m for _m in default_include_dirs if os.path.isdir(_m)]
Expand All @@ -14,15 +14,15 @@ index fc7018a..7b514bc 100644
+default_runtime_dirs =[] # [_m for _m in default_runtime_dirs if os.path.isdir(_m)]
+default_include_dirs =[] # [_m for _m in default_include_dirs if os.path.isdir(_m)]
+default_src_dirs =[] # [_m for _m in default_src_dirs if os.path.isdir(_m)]

so_ext = get_shared_lib_extension()

@@ -814,7 +814,7 @@ class system_info(object):
path = self.get_paths(self.section, key)
if path == ['']:
path = []
- return path
+ return []

def get_include_dirs(self, key='include_dirs'):
return self.get_paths(self.section, key)
2 changes: 1 addition & 1 deletion recipes/opusfile/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def build_arch(self, arch):
# env['CFLAGS'] += openssl_recipe.include_flags(arch)
# env['LDFLAGS'] += openssl_recipe.link_dirs_flags(arch)
# env['LIBS'] = openssl_recipe.link_libs_flags()

from rich.pretty import pprint
pprint(env)
time.sleep(5)
Expand Down
4 changes: 2 additions & 2 deletions recipes/pycodec2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def get_recipe_env(self, arch, with_flags_in_cc=True):
env['LDFLAGS'] += f' -L{self.ctx.get_libs_dir(arch.arch)}'
env['LDFLAGS'] += f' -L{self.ctx.libs_dir}'
env['LDFLAGS'] += codec2_recipe.link_dirs_flags(arch)

return env

def build_arch(self, arch):
Expand All @@ -32,7 +32,7 @@ def build_arch(self, arch):
# print(arch)
# shprint(sh.Command("pwd"))
# shprint(sh.Command("ls"))

# pe_args = ["--replace-needed", "libcodec2.so.1.2", "libcodec2.so", "build/lib.linux-x86_64-3.11/pycodec2/pycodec2.cpython-311-x86_64-linux-gnu.so"]
# shprint(sh.Command("patchelf"), *pe_args)

Expand Down
14 changes: 7 additions & 7 deletions sbapp/kivymd/uix/chip/chip.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,18 +294,18 @@ def build(self):
orientation: "vertical"
'''
)
class CustomOneLineIconListItem(OneLineIconListItem):
icon = StringProperty()
class PreviewIconsScreen(MDScreen):
filter = ListProperty() # list of tags for filtering icons
def set_filter_chips(self):
'''Asynchronously creates and adds chips to the container.'''
async def set_filter_chips():
for tag in ["Outline", "Off", "On"]:
await asynckivy.sleep(0)
Expand All @@ -318,7 +318,7 @@ async def set_filter_chips():
)
chip.bind(active=lambda x, y, z=tag: self.set_filter(y, z))
self.ids.chip_box.add_widget(chip)
asynckivy.start(set_filter_chips())
def set_filter(self, active: bool, tag: str) -> None:
Expand Down
Loading

0 comments on commit 78cb4e2

Please sign in to comment.