Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/smart_open/constants.py: 91%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

11 statements  

1# -*- coding: utf-8 -*- 

2# 

3# Copyright (C) 2020 Radim Rehurek <me@radimrehurek.com> 

4# 

5# This code is distributed under the terms and conditions 

6# from the MIT License (MIT). 

7# 

8 

9"""Some universal constants that are common to I/O operations.""" 

10 

11 

12READ_BINARY = 'rb' 

13 

14WRITE_BINARY = 'wb' 

15 

16APPEND_BINARY = 'ab' 

17 

18# APPEND_BINARY intentionally excluded: only Azure supports it, other transports should error. 

19BINARY_MODES = (READ_BINARY, WRITE_BINARY) 

20 

21BINARY_NEWLINE = b'\n' 

22 

23WHENCE_START = 0 

24 

25WHENCE_CURRENT = 1 

26 

27WHENCE_END = 2 

28 

29WHENCE_CHOICES = (WHENCE_START, WHENCE_CURRENT, WHENCE_END)