Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,3 +265,22 @@ def place_before(path, text, *before_text, escape=None):
file_path,
merge=lambda src, dst, _,: f"{dst}\n{src}",
)

place_before(
"noxfile.py",
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

I see firestore adds an escape character here. Maybe that's why it's not working?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I found out that using s.replace instead of place_before makes it work. The escape characters were used because s.replace takes in a regex.

@nox.session(python=DEFAULT_PYTHON_VERSION)
def lint(session):
""",
'''
@nox.session(python=DEFAULT_PYTHON_VERSION)
def mypy(session):
"""Verify type hints are mypy compatible."""
session.install("-e", ".")
session.install("mypy", "types-setuptools")
# TODO: also verify types on tests and logging_v2
session.run("mypy", "-p", "google.cloud.logging", "--no-incremental")


''',
)