Skip to content
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

Fix typing in napari.utils.perf #6132

Merged
merged 2 commits into from Sep 1, 2023
Merged

Conversation

dstansby
Copy link
Contributor

@dstansby dstansby commented Aug 9, 2023

Fixes typing errors in napari.utils.perf.

Type of change

  • Maintenance (changes required to run napari, tests, & CI smoothly)

@dstansby dstansby marked this pull request as ready for review August 11, 2023 20:06
@codecov
Copy link

codecov bot commented Aug 11, 2023

Codecov Report

Merging #6132 (5468c7d) into main (b5ecd29) will increase coverage by 0.00%.
Report is 7 commits behind head on main.
The diff coverage is 75.00%.

@@           Coverage Diff           @@
##             main    #6132   +/-   ##
=======================================
  Coverage   91.62%   91.62%           
=======================================
  Files         579      579           
  Lines       50663    50664    +1     
=======================================
+ Hits        46419    46422    +3     
+ Misses       4244     4242    -2     
Files Changed Coverage Δ
napari/utils/perf/_timers.py 84.12% <50.00%> (ø)
napari/utils/perf/_patcher.py 60.71% <75.00%> (+0.71%) ⬆️
napari/utils/perf/_event.py 97.14% <100.00%> (ø)
napari/utils/perf/_stat.py 93.75% <100.00%> (ø)

... and 1 file with indirect coverage changes

@Carreau Carreau added the maintenance PR with maintance changes, label Aug 15, 2023
@Carreau Carreau added this to the 0.5 milestone Aug 15, 2023
@@ -57,5 +57,5 @@ def average(self) -> int:
average value : int.
"""
if self.count > 0:
return self.sum / self.count
return self.sum // self.count
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It super weird to have a in average... but it does seem to be what the class is supposed to do...

@Czaki Czaki added the ready to merge Last chance for comments! Will be merged in ~24h label Aug 28, 2023
@Czaki Czaki modified the milestones: 0.5, 0.5.0 Aug 28, 2023
@andy-sweet andy-sweet merged commit 76754d9 into napari:main Sep 1, 2023
39 of 40 checks passed
@andy-sweet andy-sweet removed the ready to merge Last chance for comments! Will be merged in ~24h label Sep 1, 2023
@dstansby dstansby deleted the typing-_perf branch September 1, 2023 21:31
kne42 added a commit to kne42/napari that referenced this pull request Sep 19, 2023
* main: (26 commits)
  Fix some typing in napari.components (napari#6203)
  Use class name for object that does not have qt name (napari#6222)
  test: [Automatic] Constraints upgrades: `hypothesis`, `magicgui`, `psygnal`, `tensorstore`, `tifffile`, `tqdm`, `virtualenv` (napari#6143)
  Replace more np.all( ... = ...) with np.array_equal (napari#6213)
  remove np.all(... == ...) in test_surface.py (napari#6218)
  Ensure pandas Series is initialized with a list as data (napari#6226)
  Stop using temporary directory for store array for paint test (napari#6191)
  Bugfix: ensure thumbnail represents canvas when multiscale (napari#6200)
  cleanup np.all(... == ...) from test_points.py (napari#6217)
  [pre-commit.ci] pre-commit autoupdate (napari#6221)
  use app-model for file menu (napari#4865)
  Add tests to cover slicing behavior when changing layers and data (napari#4819)
  [pre-commit.ci] pre-commit autoupdate (napari#6128)
  Add test coverage for async slicing of labels (napari#5325)
  Add collision check when set colors for labels layer (napari#6193)
  Update "toggle ndview" text (napari#6192)
  Prevent layer controls buttons changing layout while taking screenshots with flash effect on (napari#6194)
  Fix typing in napari.utils.perf (napari#6132)
  Add GUI test coverage for changes to Labels.show_selected_label (napari#5372)
  Fix types in 'napari.utils.colormaps.categorical_colormap' (napari#6154)
  ...
@Carreau Carreau added the typing PR that focus on typing improvement label Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance PR with maintance changes, typing PR that focus on typing improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants