Skip to content

blue changes %autoreload 2 in jupyter ntoebooks to random hex #99

@Vulwsztyn

Description

@Vulwsztyn

How to reproduce:

  1. create a jupyter notebook file with content:
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "%load_ext autoreload\n",
    "%autoreload 2"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
  1. have blue and black[jupyter] installed,
  2. run blue

Most env agnostic way would be:
2. run docker container run -it -v pwd:/app -w /app pyfound/black bash
3. (inside the docker) run pip install black[jupyter]; pip install blue
4. (inside the docker) run blue .

Current behaviour:
The

%load_ext autoreload
%autoreload 2

in jupyter notebook gets formatted as:

""%load_ext autoreload""
'b3d554e307.'

Expected behaviour:
it is left unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions