Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 17, 2025
1 parent 0050dd8 commit e25484e
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions omero/plugins/web.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Plugin for our configuring the OMERO.web installation
Plugin for our configuring the OMERO.web installation
Copyright 2009-2016 University of Dundee. All rights reserved.
Use is subject to license terms supplied in LICENSE.txt
Copyright 2009-2016 University of Dundee. All rights reserved.
Use is subject to license terms supplied in LICENSE.txt
"""

Expand Down
2 changes: 1 addition & 1 deletion omeroweb/feedback/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Version: 1.0
#

""" A view functions is simply a Python function that takes a Web request and
"""A view functions is simply a Python function that takes a Web request and
returns a Web response. This response can be the HTML contents of a Web page,
or a redirect, or the 404 and 500 error, or an XML document, or an image...
or anything."""
Expand Down
2 changes: 1 addition & 1 deletion omeroweb/testlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

"""
Library for Web integration tests
Library for Web integration tests
"""
import json
import warnings
Expand Down
2 changes: 1 addition & 1 deletion omeroweb/webadmin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# Version: 1.0
#

""" A view functions is simply a Python function that takes a Web request and
"""A view functions is simply a Python function that takes a Web request and
returns a Web response. This response can be the HTML contents of a Web page,
or a redirect, or the 404 and 500 error, or an XML document, or an image...
or anything."""
Expand Down
2 changes: 1 addition & 1 deletion omeroweb/webclient/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

""" Helper functions for views that handle object trees """
"""Helper functions for views that handle object trees"""

import logging
import time
Expand Down
2 changes: 1 addition & 1 deletion omeroweb/webclient/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

""" A view functions is simply a Python function that takes a Web request and
"""A view functions is simply a Python function that takes a Web request and
returns a Web response. This response can be the HTML contents of a Web page,
or a redirect, or the 404 and 500 error, or an XML document, or an image...
or anything."""
Expand Down
4 changes: 2 additions & 2 deletions omeroweb/webgateway/plategrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# Use is subject to license terms supplied in LICENSE.txt

"""
Module to encapsulate operations concerned with displaying the contents of a
plate as a grid.
Module to encapsulate operations concerned with displaying the contents of a
plate as a grid.
"""

import logging
Expand Down
18 changes: 9 additions & 9 deletions omeroweb/webgateway/templatetags/common_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,13 @@ def lengthunit(value):
"""

if value == 0:
return "\u00B5m"
return "\u00b5m"
elif value < 0.001:
return "\u212B"
return "\u212b"
elif value < 0.01:
return "nm"
elif value < 1000:
return "\u00B5m"
return "\u00b5m"
elif value < 1000 * 100:
return "mm"
elif value < 1000 * 100 * 10:
Expand Down Expand Up @@ -260,21 +260,21 @@ def timeformat(value):
return "%s s" % str(value)
# Formatting shows integer values for all, so we round() for accuracy
if value == 0:
return "%d\u00A0s" % value
return "%d\u00a0s" % value
if value < Decimal("0.001"):
return "%d\u00A0\u00B5s" % (round(value * 1000 * 1000))
return "%d\u00a0\u00b5s" % (round(value * 1000 * 1000))
elif value < 1:
return "%d\u00A0ms" % (round(value * 1000))
return "%d\u00a0ms" % (round(value * 1000))
elif round(value) < 60:
# Round and format seconds to one decimal place
value = round(value * 10) / 10
return "%0.1f\u00A0s" % value
return "%0.1f\u00a0s" % value
elif round(value) < 60 * 60:
value = round(value) # Avoids '1min 60s'
return "%d\u00A0min\u00A0%d\u00A0s" % (value / 60, value % 60)
return "%d\u00a0min\u00a0%d\u00a0s" % (value / 60, value % 60)
else:
value = round(value) # Avoids '1h 60min'
return "%d\u00A0h\u00A0%d\u00A0min" % (value / 3600, round((value % 3600) / 60))
return "%d\u00a0h\u00a0%d\u00a0min" % (value / 3600, round((value % 3600) / 60))


# taken from https://code.djangoproject.com/ticket/17419
Expand Down
2 changes: 1 addition & 1 deletion omeroweb/webredirect/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Version: 1.0
#

""" A view functions is simply a Python function that takes a Web request and
"""A view functions is simply a Python function that takes a Web request and
returns a Web response. This response can be the HTML contents of a Web page,
or a redirect, or the 404 and 500 error, or an XML document, or an image...
or anything."""
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright 2008-2020 The Open Microscopy Environment, Glencoe Software, Inc.
All rights reserved.
Copyright 2008-2020 The Open Microscopy Environment, Glencoe Software, Inc.
All rights reserved.
Use is subject to license terms supplied in LICENSE.txt
Use is subject to license terms supplied in LICENSE.txt
"""

Expand Down
6 changes: 3 additions & 3 deletions test/unit/test_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# -*- coding: utf-8 -*-

"""
Simple unit tests for the "show" module.
Simple unit tests for the "show" module.
Copyright 2014 Glencoe Software, Inc. All rights reserved.
Use is subject to license terms supplied in LICENSE.txt
Copyright 2014 Glencoe Software, Inc. All rights reserved.
Use is subject to license terms supplied in LICENSE.txt
"""

Expand Down

0 comments on commit e25484e

Please sign in to comment.