Skip to content

Commit

Permalink
refactor: common -> utils
Browse files Browse the repository at this point in the history
  • Loading branch information
fannheyward committed Sep 8, 2022
1 parent 726b574 commit 5065624
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/features/formatters/baseFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import md5 from 'md5';
import path from 'path';
import { SemVer } from 'semver';
import { promisify } from 'util';
import { getTextEditsFromPatch } from '../../common';
import { getTextEditsFromPatch } from '../../utils';
import { PythonExecutionService, isNotInstalledError } from '../../processService';
import { FormatterId, IPythonSettings, ExecutionInfo } from '../../types';

Expand Down
2 changes: 1 addition & 1 deletion src/features/formatters/blackd.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { spawn } from 'child_process';
import { CancellationToken, fetch, FormattingOptions, OutputChannel, Range, TextDocument, TextEdit, Thenable, window } from 'coc.nvim';
import getPort from 'get-port';
import { getTextEditsFromPatch } from '../../common';
import { getTextEditsFromPatch } from '../../utils';
import { IPythonSettings } from '../../types';
import { BaseFormatter } from './baseFormatter';

Expand Down
2 changes: 1 addition & 1 deletion src/features/isort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { OutputChannel, TextDocument, Uri, window, workspace } from 'coc.nvim';
import fs from 'fs-extra';
import md5 from 'md5';
import * as path from 'path';
import { getTextEditsFromPatch } from '../common';
import { getTextEditsFromPatch } from '../utils';
import { PythonSettings } from '../configSettings';
import { PythonExecutionService } from '../processService';
import { ExecutionInfo } from '../types';
Expand Down
2 changes: 1 addition & 1 deletion src/features/linters/baseLinter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import { CancellationToken, OutputChannel, TextDocument, Uri, workspace } from 'coc.nvim';
import namedRegexp from 'named-js-regexp';
import { splitLines } from '../../common';
import { splitLines } from '../../utils';
import { PythonSettings } from '../../configSettings';
import { PythonExecutionService } from '../../processService';
import { LinterId, ILintMessage, ILinter, IPythonSettings, ILinterInfo, LintMessageSeverity } from '../../types';
Expand Down
4 changes: 2 additions & 2 deletions src/features/refactor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ChildProcess } from 'child_process';
import { commands, Disposable, Document, OutputChannel, Position, Range, TextDocument, Uri, window, workspace } from 'coc.nvim';
import * as path from 'path';
import { Deferred, createDeferred } from '../async';
import { getWindowsLineEndingCount, splitLines, getTextEditsFromPatch } from '../common';
import { getWindowsLineEndingCount, splitLines, getTextEditsFromPatch } from '../utils';
import { PythonSettings } from '../configSettings';
import { PythonExecutionService } from '../processService';
import { IPythonSettings } from '../types';
Expand Down Expand Up @@ -35,7 +35,7 @@ class RefactorProxy implements Disposable {

// get line count
// Rope always uses LF, instead of CRLF on windows, funny isn't it
// So for each line, reduce one characer (for CR)
// So for each line, reduce one character (for CR)
// But Not all Windows users use CRLF
const offset = document.offsetAt(position);
const winEols = getWindowsLineEndingCount(document, offset);
Expand Down
File renamed without changes.

0 comments on commit 5065624

Please sign in to comment.