GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — HYGIENE: Using assertIsInstance, assertIs, assertIsNone, assertIsNotNone when relevant by dhermes · Pull Request #2364 · googleapis/google-cloud-python

Conversation

@dhermes

@dhermes dhermes commented Sep 20, 2016

Copy link
Copy Markdown
Contributor

Inspired by:
https://github.com/GoogleCloudPlatform/google-cloud-python/pull/2348/files#r79664980

Note that virtually all of these commits were created by REGEX matching / replacing scripts, so it's worth just reviewing those scripts:

  • https://gist.github.com/dhermes/4e36f11eba22845309a484369ce56d41
  • https://gist.github.com/dhermes/57e29d96b17a4e1543b47bd2fcebfc07
  • https://gist.github.com/dhermes/c9b2a649aec265eacee3bd6ef76c57e1
  • https://gist.github.com/dhermes/ecaff881be516f737e5abdde37acf3e2
  • https://gist.github.com/dhermes/f4176452c2436b14e0c97a114d98bace

I ran the unit and system tests locally to make sure they all still pass.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

daspecster reacted with hooray emoji
All reactions
  • 🎉 1 reaction
dhermes added 9 commits September 20, 2016 10:48
@dhermes
Replacing assertTrue(isinstance(...)) with assertIsInstance.
b990bfa
Did this using: https://gist.github.com/dhermes/57e29d96b17a4e1543b47bd2fcebfc07

NOTE: Some usage that span multiple lines are still not changed.
@dhermes
Converting remaining usage of assertTrue(isinstance(...)).
944e58d
@dhermes
Replacing assertTrue(... is None) with assertIsNone.
66ea44d
Did this using: https://gist.github.com/dhermes/c9b2a649aec265eacee3bd6ef76c57e1
@dhermes
Replacing assertTrue(... is ...) with assertIs(..., ...).
67d0385
Did this using: https://gist.github.com/dhermes/4e36f11eba22845309a484369ce56d41
@dhermes
Replacing assertFalse(... is ...) with assertIsNot(..., ...).
d07db3c
Did this using: https://gist.github.com/dhermes/ecaff881be516f737e5abdde37acf3e2
@dhermes
Replacing remaining assertTrue(... is ...) with assertIs(..., ...).
24aa6e7
Done manually by checking the output of:

$ git grep ' is$' -- unit_tests/
$ git grep ' is$' -- system_tests/
$ git grep ' is ' -- unit_tests/
$ git grep ' is ' -- system_tests/
@dhermes
Manually fixing some asserts broken by the auto scripts.
3f06350
@dhermes
Replacing assertEqual(..., None) with assertIsNone(...).
2c273f0
Did this using: https://gist.github.com/dhermes/f4176452c2436b14e0c97a114d98bace

Also had to manually undo a few of the changes since the regex
matched things like

self.assertEqual(foo, [(value, has_some, parens, None)])
@dhermes
Manually fixing some system test asserts broken by the auto scripts.
206045f
@dhermes dhermes added testing hygiene labels Sep 20, 2016
@dhermes dhermes assigned daspecster and tseaver Sep 20, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 20, 2016
@tseaver

tseaver commented Sep 20, 2016

Copy link
Copy Markdown
Contributor

LGTM pending Travis.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes
dhermes merged commit 7b36469 into googleapis:master Sep 20, 2016
@dhermes
dhermes deleted the tests-cleanup branch September 20, 2016 19:33
@dhermes dhermes mentioned this pull request Sep 29, 2016
Manually cut releases of each package #2441
Closed
@theacodes theacodes unassigned daspecster Sep 28, 2018
parthea pushed a commit that referenced this pull request Nov 24, 2025
@release-please
chore(main): release 1.23.6 (#2364)
a896aed
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Apr 1, 2026
@shuoweil
feat: Configure Biome for Consistent Code Style (#2364)
c49595e
This PR adds `biome.json` to enforce consistent 2-space indentation and
single quotes for JavaScript and CSS files. This aligns with project
style guides, automates formatting via pre-commit hooks, and prevents
manual style changes from being overwritten.

Currently, our Biome setup relies on default settings, which violates
Google coding style guidelines. Specifically:
* **Quotation Marks:** Biome's defaults do not enforce single quotes for
JavaScript (as per `js_style.txt`: `screen/8NaEr3SswN6qx6D`) and CSS
property values (as per `css_style.txt`: `screen/9KCh8ZVQ4ByPeDR`).
* **Indentation:** Biome's defaults do not consistently enforce 2 spaces
for indentation across HTML (`screen/97ZZstQc4iH4Dsb`) and JavaScript
(`screen/3crxm5peLvRE2kj`) files.

This configuration explicitly sets these rules to ensure full
compliance.

**Benefits:**
*   Consistent and readable JS/CSS code.
*   Automated style enforcement.
*   Reduced developer friction.

**To Test:**
Make a style-violating change in a `.js` or `.css` file and attempt to
commit. Biome should automatically reformat it.

Fixes #<issue_number_goes_here> 🦕
parthea pushed a commit that referenced this pull request Apr 1, 2026
@chelsea-lin
chore: librarian release pull request: 20260122T231714Z (#2402)
bf54d16
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v0.7.0
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:e7cc6823efb073a8a26e7cefdd869f12ec228abfbd2a44aa9a7eacc284023677
<details><summary>bigframes: 2.33.0</summary>

##
[2.33.0](google/bigframes@v2.32.0...v2.33.0)
(2026-01-22)

### Features

* add bigquery.ml.transform function (#2394)
([1f9ee373](google/bigframes@1f9ee373))

* Add dark mode to anywidget mode (#2365)
([2763b41d](google/bigframes@2763b41d))

* Add max_columns control for anywidget mode (#2374)
([34b5975f](google/bigframes@34b5975f))

* Configure Biome for Consistent Code Style (#2364)
([81e27b3d](google/bigframes@81e27b3d))

* Add BigQuery ObjectRef functions to `bigframes.bigquery.obj` (#2380)
([9c3bbc36](google/bigframes@9c3bbc36))

* Stabilize interactive table height to prevent notebook layout shifts
(#2378)
([a634e976](google/bigframes@a634e976))

### Bug Fixes

* implement retry logic for cloud function endpoint fetching (#2369)
([0f593c27](google/bigframes@0f593c27))

* Throw if write api commit op has stream_errors (#2385)
([7abfef05](google/bigframes@7abfef05))

### Performance Improvements

* Avoid requery for some result downsample methods (#2219)
([95763ff2](google/bigframes@95763ff2))

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@tseaver tseaver

Labels

cla: yes This human has signed the Contributor License Agreement. testing

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@dhermes @tseaver @daspecster @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.