Skip to content

Commit

Permalink
chore: clean lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaqq committed Jan 16, 2025
1 parent d704a96 commit 6949345
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion dont-merge/send-traces.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""FIXME dummy docstring."""

from __future__ import annotations

import logging
Expand Down Expand Up @@ -52,5 +53,5 @@ def main():


if __name__ == '__main__':
logging.basicConfig(level="INFO")
logging.basicConfig(level='INFO')
main()
1 change: 1 addition & 0 deletions ops/tracing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
If OTEL guts are installed, real implementation.
If OTEL deps are missing, ProxyTracer pointing to NoOpTracer, doing nothing.
"""

from __future__ import annotations

import logging
Expand Down
12 changes: 7 additions & 5 deletions ops/tracing/_fixme.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
"""FIXME Docstring."""

from __future__ import annotations

import functools
Expand Down Expand Up @@ -609,7 +610,7 @@ def _get_tracer() -> Optional[Tracer]:
logger.warning(
'Tracer not found in `tracer` context var. '
"Verify that you're importing all `charm_tracing` symbols "
"from the same module path. \n"
'from the same module path. \n'
'For example, DO'
': `from charms.lib...charm_tracing import foo, bar`. \n'
'DONT: \n'
Expand Down Expand Up @@ -1115,10 +1116,11 @@ def trace_function(function: _F, name: Optional[str] = None) -> _F:
return _trace_callable(function, 'function', name=name)


def _trace_callable(callable: _F, # noqa: A002 # FIXME callable is a builtin
qualifier: str,
name: Optional[str] = None,
) -> _F:
def _trace_callable(
callable: _F, # noqa: A002 # FIXME callable is a builtin
qualifier: str,
name: Optional[str] = None,
) -> _F:
dev_logger.debug(f'instrumenting {callable}')

# sig = inspect.signature(callable)
Expand Down

0 comments on commit 6949345

Please sign in to comment.